package cn.codewen.shop.service.impl;

import cn.codewen.shop.dao.impl.ProductDaoImpl;
import cn.codewen.shop.pojo.Product;
import cn.codewen.shop.service.ProductService;

import java.util.List;

public class ProductServiceImpl implements ProductService {
    ProductDaoImpl productDao = new ProductDaoImpl();

    @Override
    public List<Product> findAll() {

        return productDao.findAll();
    }

    @Override
    public void insert(Product product) {
        productDao.insert(product);
    }

    @Override
    public Product getOne(int id) {
        return productDao.getOne(id);
    }

    @Override
    public void save(Product product) {
        productDao.save(product);
    }

    @Override
    public void del(int id) {
    productDao.del(id);

    }
}
